import React from 'react';
import {StyleSheet} from 'react-native';
import {createStackNavigator} from '@react-navigation/stack';
import DetilPage from './detil';
import ListPage from './list';
import IconButton from '../../../components/IconButton';
const Stack = createStackNavigator();

const index = () => {
  return (
    <Stack.Navigator>
      <Stack.Screen
        name="ListPage"
        component={ListPage}
        options={{
          headerTitleAlign: 'center',
          headerStyle: {
            backgroundColor: '#000',
          },
          headerTitleStyle: {
            color: '#fff',
          },
        }}
      />
      <Stack.Screen
        name="DetilPage"
        component={DetilPage}
        options={{
          title: '',
          headerTransparent: true,
          headerBackImage: () => {
            return <IconButton name="arrowleft" color="#fff" size={25} />;
          },
          headerRight: () => {
            return <IconButton name="search1" color="#fff" size={25} />;
          },
        }}
      />
    </Stack.Navigator>
  );
};

export default index;

const styles = StyleSheet.create({});
